package com.pet_service.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.pet_service.util.CodeEnum;
import lombok.Getter;

/**
 * 用户注册类型枚举
 */
@Getter//自动生成 getter方法
public enum TUserRegisterTypeStatus implements CodeEnum {
    ACCOUNT_PASSWORD(1, "账号密码"),
    PHONE(2, "手机号"),
    QQ(3, "QQ"),
    WECHAT(4, "微信");

    @EnumValue//标记枚举与数据库交互时使用的值。
    private final int code;
    private final String desc;

    TUserRegisterTypeStatus(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() { return code; }
    public String getDesc() { return desc; }
}
